package com.ds.infrastructure.hyperspace.console.entity.enums;

public interface TbContainerConfigEnum {
    /**
     * 编辑状态:1(可编辑);2(不可编辑).PS:配置激活后则不可编辑'
     */
    enum EDIT_STATE {
        YES(1, "可编辑"),
        NO(2, "不可编辑");

        public final Integer code;
        private final String desc;

        EDIT_STATE(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public static EDIT_STATE toEnum(int value) {
            for (EDIT_STATE item : EDIT_STATE.values()) {
                if (item.code == value) {
                    return item;
                }
            }
            return null;
        }
    }
}
